package com.my.chapter7;

public class practice23 {
    public static void main(String[] args) {
        Bb b = new Bb();
        System.out.println("..........................");
        Aa a = new Aa();
        System.out.println("..........................");
        System.out.println(Cc.k);
    }
}

class Aa{
    private static int i = printInit("static Aa.i initialized");
    public Aa(){
        System.out.println("Aa constructor");
    }
    static int printInit(String s){
        System.out.println(s);
        return 6;
    }
}

class Bb extends Aa{
    private int j = printInit("static Bb.j initialized");
    public Bb(){
        System.out.println("Bb constructor");
    }
}

class Cc extends Aa{
    static int k = 3;
    private static int n = printInit("static Cc.n initialized");
}


